﻿using System;
using System.Collections.Generic;
using System.Text;

namespace PosHacker.Utility
{
    class POSUtility
    {
        public static string GetJSTime()//equal JS:new Date().getTime()
        {

            //MSScriptControl.ScriptControlClass sc = new MSScriptControl.ScriptControlClass();
            //sc.Language = "javascript";
            //object obj = sc.Eval("new Date().getTime();");

            Int64 retval = 0;
            DateTime st = new DateTime(1970, 1, 1);
            //DateTime st = DateTime.Now;
            TimeSpan t = (DateTime.Now.ToUniversalTime() - st);
            retval = (Int64)(t.TotalMilliseconds + 0.5);
            return retval.ToString();
        }
    }
}
